"""原生应用测试"""
from appium import webdriver
from time import sleep
from appium.webdriver.common.touch_action import TouchAction
caps = {}
caps["automationName"] = "Appium"
caps["platformName"] = "android"
caps["platformVersion"] = "6.0"
caps["appPackage"] = "com.android.browser"
caps["appActivity"] = ".BrowserActivity"
caps["deviceName"] = "oppo R9sk"
# caps["noReset"] = True

driver = webdriver.Remote("http://localhost:4723/wd/hub",caps)
driver.get("http://www.baidu.com")
sleep(5)
driver.find_element_by_id("index-kw").send_keys("appium mobile wb")
sleep(5)
driver.find_element_by_id("index-bn").click()
sleep(5)
driver.quit()